package network;

import java.util.ArrayList;

public class Stage1Thread extends Thread {
    private Changes changes;
    private Network n;

    public Stage1Thread(int nThreads, int id, ArrayList<Rule> rules, Network n, Changes changes) {
        ArrayList<Rule> filteredRules = new ArrayList<>();
        for (Rule rule : rules) {
            if (rule.getDevice().uid % nThreads == id) {
                filteredRules.add(rule);
            }
        }
        this.changes = changes;
        this.n = n;
    }

    @Override
    public void run() {
        n.insertMiniBatch(n.getInitialRules(), changes);
    }
}
